<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 2016/4/6
 * Time: 19:23
 
 */
namespace liketry\controllers;

use services\models\CommentsRelation;
use Yii;

class CommentsRelationController extends CustomController
{

    /*
     * 适用于个人中心评论列表,包括精华评论、回复评论
     * */
/*    public function actionOwnCommentsList(){
        $model = new CommentsRelation();
        $bestry_uid = 100;
        $condition = array(
            'is_perfect'    => isset($_GET['is_perfect'])?intval($_GET['is_perfect']):0,
            'is_reply'      => isset($_GET['is_reply'])?intval($_GET['is_reply']):0,
        );
        //var_dump($model->getOwnCommentsFromRedis($bestry_uid, $condition));
        //var_dump($model->getOwnCommentsNumberFromRedis($bestry_uid));

    }*/

    //商品评论列表
/*    public function actionGoodsComments(){
        $goods_id = isset($_GET['goods_id']) ? intval($_GET['goods_id']) : 0;
        $model = new CommentsRelation();
        var_dump($model->getGoodsCommentsFromRedis($goods_id));

    }*/

    //商品好评率
/*    public function actionFeedbackRate(){
        $goods_id = isset($_GET['goods_id']) ? intval($_GET['goods_id']) : 0;
        $model = new CommentsRelation();
        var_dump($model->getFeedbackRate($goods_id));
        //var_dump($model->getFeedbackList($goods_id,'A'));
        var_dump($model->getFeedbackNumber($goods_id));
        var_dump($model->getFeedbackTotal($goods_id));
    }*/


}